package at.fhooe.mcm12.java.sensors.data;

public class Temperature extends SensorValue{

	private double m_temperature;
	private String m_unit;
	
	public Temperature(double _temperature, String _unit, long _timestamp)
	{
		super(_timestamp, "Celsius");
		m_temperature = _temperature;
		m_unit = _unit;
	}
	
	public double getTemperature()
	{
		return m_temperature;
	}
	
	public void setTemperature(double _temperature)
	{
		m_temperature = _temperature;
	}

	public String toString()
	{
		return String.format("%.2f " + m_unit, m_temperature);
	}
}
